package com.ly.mpayment.core.util;

import java.io.File;
import java.io.IOException;
import java.util.Properties;

import org.apache.log4j.Logger;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.core.io.support.PropertiesLoaderUtils;


/**
 * 
 * ConstUtils.java<br/>
 * 所属类别:常用操作消息常量<br/>
 * Date:2013-6-28 下午4:07:10 <br/>
 * Version:1.0 <br/>
 */
public class ConstUtils {
	
	static Logger logger = Logger.getLogger(ConstUtils.class);
	
	public enum cardType {
	}


	
	/****************************************************************************UPLOADiMAGE***************************************************/
	public static final String BASE_PATH = File.separator+"upload"+File.separator+"newsImage"+File.separator;
	
	/**
	 * 加载配置
	 * @Title getProperties 
	 * @Description TODO
	 * @return
	 */
	public static Properties getProperties(){
		try {
			Resource resource = new ClassPathResource(("upload.properties"));
			return PropertiesLoaderUtils.loadProperties(resource);
		} catch (IOException e) {
			logger.info("加载upload文件失败:");
		}
		return null;
	}
	
	//配置文件 upload.properties不存在 请联系管理员创建
	public static String uploadProperties = "配置文件 upload.properties不存在 请联系管理员创建";
	
	public static String HANDLE_MESSAGE_NOT_EXIST = "该事件处理信息不存在,请联系管理员";
	
	public static String NOT_EVENT_FRACTION = "请联系管理员添加对应的事件评分标准后才能确认处理!";
}
